import axios from 'axios'

// let baseUrl = 'http://10.1.87.76:8787';
 let baseUrl = 'http://10.1.87.76:8787';
const service = axios.create({
  baseURL: baseUrl, // api的base_url
  timeout: 10000    // 请求超时时间
});

export function alipay(orderInfo) {
  return service({
    url: '/pay/alipay',
    method: 'post',
    data: orderInfo
  })
}

export function wxpay(orderInfo) {
  return service({
    url: '/pay/wxpay',
    method: 'post',
    data: orderInfo
  })
}

export function getGoodsType() {
  return service({
    url: '/open/consume/goods_type',
    method: 'get',

  })
}
export function getGoodsByTypeId(params) {
  return service({
    url: '/open/consume/goods',
    method: 'get',
    params: params
  })
}
export function getShopInfo(params) {
  return service({
    url: '/open/consume/shop',
    method: 'get',
    params: params
  })
}
//查询订单
export function queryTask(params) {
  return service({
    url: '/open/consume/order',
    method: 'get',
    params: params
  })

}
